const { defineConfig } = require("@vue/cli-service");
const mork = require("./mork");
module.exports = defineConfig({
  transpileDependencies: true,
  // lintOnSave: false,
  devServer: {
    proxy: {
      //代理
      "/api": {
        // 匹配以api开头是
        target: "http://sph-h5-api.atguigu.cn", // 目标地址
      },
    },
    //请求的匹配的中间件，发请求时会进入中间件，进行匹配中间件匹配

    onBeforeSetupMiddleware(devServer) {
      console.log(devServer);
      const app = devServer.app;
      mork(app);
    },
  },
});
